package com.xyoto.takeawayBusiness.mapper;

import com.xyoto.takeawayBusiness.entity.Shopping;
import com.xyoto.takeawayBusiness.vo.ShoppingVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @ClassName: 商品类别Mapper
 * @Author: 挽风
 * @Date: 2022
 * @Copyright: 2022 by 挽风
 * @Description:
 **/
@Mapper
public interface ShoppingMapper {

    /**
     * 新增商品
     * @param shopping
     * @return
     */
    Integer saveShopping(Shopping shopping);

    /**
     * 查询商品信息
     * @param shoppingId
     * @return
     */
    Shopping getShoppingInfo(Integer shoppingId);

    /**
     * 修改商品
     * @param shopping
     * @return
     */
    Integer updateShopping(Shopping shopping);


    /**
     * 通过id删除商品
     * @param shoppingId
     */
    Integer deleteShopping(Integer shoppingId);

    /**
     * 查询此菜单分类下的所有商品id
     * @param menuId
     * @return
     */
    List<Integer> findShoppingIdBymenuId(Integer menuId);

    /**
     * 查询商品主键
     * @param uuid
     * @return
     */
    Integer getShoppingId(String uuid);

    /**
     * 查询商品信息
     * @param id
     * @return
     */
    ShoppingVO getShoppingInfoById(Integer id);

    /**
     * 根据删除商品
     * @param id
     * @return
     */
    Integer removeShopping(Integer id);
}
